{include file="header_old.tpl.php"}


<!--Contents-->
<div id="contents">

<!--left Panel-->
{include file="sidebar.tpl.php"}
<!--End left Panel-->



<div id="memberRightPanel">
 
 <div class="heading1">Request A Payment</div>
<div class="gap10px">&nbsp;</div>
 
<div class="clear"> 



<!--Form Area-->
<div class="left" style="width:500px; background:#f6f6f6; padding:20px; overflow:hidden;  -moz-border-radius: 4px;  -webkit-border-radius: 4px;   -khtml-border-radius: 4px;  border-radius: 4px;  border:1px solid #cccccc; color:#252525">

{if $error_msg ne ""}
     
      <div class="error">
        {$error_msg}
        </div>
     
{elseif $success_msg ne ""}

      
      <div  class="success" >
       {$success_msg}
      </div>
    
{/if}


  {if $cashout_available ne "0" && $cdate eq "yes"} 
   <form action="cashout.php" method="post" id="payform">
   <input type="hidden" name="availableBalance" id="availableBalance" value="{$available_money}" />
   <table cellspacing="8" style="width:450px;" class="cashoutForm">
   <tr><td>Amount</td><td><input type="text" name="amount" value="{$amount}"  onblur="calculateCost()" id="amt"    maxlength="8" /></td></tr>   
   <tr><td>Fee</td><td><span id="fee" style="color:#252525; font-weight:bold">$0.00</span></td></tr>
   <tr><td>Payment Method</td><td><select name="method" onchange="changeMethodName()" id="cMethod" style="width:145px"><option value="paypal" {if $method eq "paypal"} selected="selected" {/if} > Paypal </option><option  value="payza" {if $method eq "payza"} selected="selected" {/if} > Payza </option><option  value="Moneybookers" {if $method eq "Moneybookers"} selected="selected" {/if} > Moneybookers (Skrill) </option><option value="Wire" {if $method eq "Wire"} selected="selected" {/if}>Wire</option><option value="WesternUnion" {if $method eq "WesternUnion"} selected="selected" {/if}>Western Union</option></select></td></tr>
   <tr id="emailCon"><td id="cmn" style="width:150px;">Paypal Email</td><td><input type="text" name="email_address" value="{$email}" /></td></tr>
   <tr id="notesArea"><td style="width:150px;">Details</td><td><textarea name="notes"></textarea></td></tr>
   <tr><td>Cashout Type</td><td><select name="priority" onchange="calculateCost()" id="costCal" style="width:145px"><option value="normal" > Normal - (0% fee) </option>{if $QUICK_PAY_AVAILABLE eq "1"} <option  value="quick" > Quick - ( {if $QUICK_PAY_FLAT_FEE gt "0"} ${$QUICK_PAY_FLAT_FEE} {elseif $QUICK_PAY_FEE gt "0"} {$QUICK_PAY_FEE*100}% {else} $0 {/if}  fee) </option> {/if}</select></td></tr>
  
   

   <input type="hidden" name="cashout" value="cashout" />

   <tr><td colspan="2"> <input type="submit" name="cashout_btn" onclick="submitNow(this)" value="Cashout" /></td></tr>
   </table>

{literal}
<script type="text/javascript">
function submitNow(e)
{
	$('#payform').submit();
	e.disabled=true;
}
</script>
{/literal}


   {if $type ne "" && $method eq "Check"}
   <script type="text/javascript">
   
   toggleCheckArea('{$type}');
   
   </script>
   
   {else}
   

     
   {/if}
      <script type="text/javascript">
   
   changeMethodName();
   
   </script>

 
  </form>
  
  {elseif $cdate eq "no"}
  
  
      {if $C_DATE2 gt $C_DATE1}
      
      <div style="font-size:13px; font-weight:bold; color:#666666; margin-top:5px;">Cashout form will be available from day-{$C_DATE1} to day-{$C_DATE2} of each month.</div>
      
      {else}
      
      <div style="font-size:13px; font-weight:bold; color:#666666; margin-top:5px;">Cashout form will be available on day-{$C_DATE1} of each month.</div>      
      
      {/if}
  
  
  {elseif $pendingRequests eq "1"}
    <div style="font-size:13px; font-weight:bold; color:#666666; margin-top:5px;">You already have a pending cashout request.</div>
  {else}
  <div style="font-size:13px; font-weight:bold; color:#666666; margin-top:5px;">Cashout form will only appear when you reach balance equal or more then minimum cashout limit.</div>
  {/if}
  
  
  <div style="text-align:center; font-weight:bold; width:99%">Available Cash: ${$total_earnings}</div>
<div style="clear:both; width:470px; margin:15px 0; font-size:12px;">



</div>  
  
</div> 
<!--End Form-->







    

<br />


</div>


  


      <!--Payment History Area-->
       <div style="clear:both;"><br />
       <div class="sub_heading">Recent Payouts</div>
       <br />
       <table class="earnings_table" cellspacing="0">
       <tr>
           <th>&nbsp;&nbsp;Date</th><th>&nbsp;&nbsp;Amount</th><th>Method</th><th>&nbsp;&nbsp;Type</th><th>&nbsp;&nbsp;Status</th>{if $history ne ''}<th>&nbsp;</th>{/if}
       </tr>
       
        {if $history ne ''}
	  {foreach item=transaction from=$history}
	  
	  <tr style="background:#{cycle values='ffffff,efefef'}; height:22px"><td>&nbsp;&nbsp;{$transaction.date}</td><td>&nbsp;&nbsp;${$transaction.cash}</td><td>{$transaction.method} {if $transaction.method eq "Check"}({$transaction.type}){/if}</td><td>&nbsp;&nbsp;{if $transaction.priority eq "quick"}<span style="color:#F00"><b>{$transaction.priority}</b></span>{else}{$transaction.priority}{/if}</td><td>&nbsp;&nbsp;{if $transaction.status eq "Locked"}In Process{else}{$transaction.status}{/if}</td><td style="width:120px;">{if $transaction.status eq "Pending"}<form action="cashout.php" method="post" id="form_request_{$transaction.id}"> <input type="hidden" name="request_id" value="{$transaction.id}" /><select name="cancelCashout" onblur="cancelRequest('request_{$transaction.id}')" id="request_{$transaction.id}"><option value="0">Select Action</option><option value="cancel">Cancel</option></select></form>{/if}</td></tr>
	  
	  {/foreach}
	  
  {else}	  
  
      <tr style="background:#fff"><td colspan="3" style="text-align:center; border:0px; border-left:1px solid #999999;  font-size:12px">Payment history not available.</td></tr>
	  
  {/if}	  
       
       </table>
       
       
       </div>
       <!--End Payment History Area-->




<br />





            </div>
          
 <!--End left Panel-->
 

 
 </div>

{include file="footer_old.tpl.php"}